package com.bdzl.biz.servicefeign;

import com.bdzl.biz.common.config.FeignConfig;
import com.bdzl.pub.config.Constant;
import com.bdzl.pub.entity.data.UserInfoDO;
import com.bdzl.pub.vo.data.UserInfoVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name="loanAdmin", configuration = FeignConfig.class,contextId = "AdminFeignService",url = Constant.sys+":8001")
public interface AdminFeignService {
    /**
     * @Description: TODO 添加客户身份信息
     * @param userInfo 客户身份信息
     * @return: java.lang.Object
     * @Author: Ming
     * @Date: 2021/5/17 10:43
     */
    @PostMapping(value = "/bdzl/userInfo/save")
    Object saveUserInfo(@RequestBody UserInfoDO userInfo);

    /**
     * @Description: TODO 编辑客户身份信息
     * @param userInfo 客户身份信息
     * @return: java.lang.Object
     * @Author: Ming
     * @Date: 2021/5/17 10:43
     */
    @PostMapping(value = "/bdzl/userInfo/update")
    Object updateUserInfo(@RequestBody UserInfoDO userInfo);

    /**
     * @Description: TODO 获取客户数据
     * @param conId 客户id
     * @param odrNo 订单号
     * @return: com.bdzl.pub.vo.data.UserInfoVO
     * @Author: Ming
     * @Date: 2021/5/18 19:24
     */
    @PostMapping(value = "/bdzl/userInfo/getUserInfo")
    UserInfoVO getUserInfo(@RequestParam("conId")Integer conId, @RequestParam("odrNo") String odrNo);

    /**
     * @Description: TODO 根据身份证号查询数据
     * @param conCardid 客户身份证号
     * @return: com.bdzl.pub.vo.data.UserInfoVO
     * @Author: Ming
     * @Date: 2021/5/18 19:24
     */
    @PostMapping(value = "/bdzl/userInfo/getSpouse")
    UserInfoDO getSpouse(@RequestParam("conCardid")String conCardid);

    /**
     * @Description: TODO 根据id删除客户信息
     * @param conId 客户身份证号
     * @return: com.bdzl.pub.vo.data.UserInfoVO
     * @Author: Ming
     * @Date: 2021/5/18 19:24
     */
    @PostMapping(value = "/bdzl/userInfo/remove")
    Object removeUserInfo(@RequestParam("conId")Integer conId);
}
